package org.xserver.bootstrap.listener;

import org.xserver.bootstrap.listener.exception.BootstrapListenerError;

/**
 * XServer support user-defined some behaves when server start.
 * 
 * @author wangj
 * @since 2016/07/25
 *
 */
public interface BootstrapListener {

	/**
	 * If return true, ignore {@link #process(String...)} throw exception and
	 * finally go next bootstrapListener.
	 */
	public abstract boolean isExceptionContinue();

	/**
	 * when the server start, if config bootstrapListener, the bootstrapListener
	 * will invoke this method as processing context
	 * 
	 * @param args
	 * @throws Exception
	 */
	public abstract void process(String... args) throws BootstrapListenerError;

	public abstract String getName();
}
